<?php
// +----------------------------------------------------------------------
// | ThinkCMF [ WE CAN DO IT MORE SIMPLE ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013-2017 http://www.thinkcmf.com All rights reserved.
// +----------------------------------------------------------------------
// | Author: Dean <zxxjjforever@163.com>
// +----------------------------------------------------------------------
// API 模板文件，可以复制
namespace api\resource\controller;

use think\Db;
use think\Request;
use think\Validate;
use cmf\controller\RestBaseController;

class Biao31Controller extends RestBaseController
{


    public function one($data)
    {

        //查 这个表的数据
        @$new_data = $data[0]['content'];
        if (empty($new_data)) {
            return '';
        }
        @$text17 = $new_data->text17;
        @$text17 = json_decode($text17);

       $html = '
       <div style="width: 1200px;margin: 0 auto;">
            <div style="font-size: 16px;font-weight: 600;margin-bottom: 15px;">九、项目组成员信息</div>
            <table border="1" cellspacing="0px" cellpadding="5px" width="1200">
                <tbody>
                <tr>
                    <td rowspan="4">项目负责人</td>
                    <td>姓名</td>
                    <td colspan="2">'.@$new_data->text1.'</td>
                    <td>证件类型</td>
                    <td colspan="2">'.@$new_data->text2.'</td>
                    <td>证件号码</td>
                    <td colspan="3">'.@$new_data->text3.'</td>
                    <td>性别</td>
                    <td colspan="2">'.@$new_data->text4.'</td>
                </tr>
                <tr>
                    <td>出生年月</td>
                    <td colspan="2">'.@$new_data->text5.'</td>
                    <td>民族</td>
                    <td colspan="2">'.@$new_data->text6.'</td>
                    <td>国籍</td>
                    <td colspan="3">'.@$new_data->text7.'</td>
                    <td>学历</td>
                    <td colspan="2">'.@$new_data->text8.'</td>
                </tr>
                <tr>
                    <td>学位</td>
                    <td colspan="2">'.@$new_data->text9.'</td>
                    <td>学位授予国家（或地区）</td>
                    <td colspan="2">'.@$new_data->text10.'</td>
                    <td>职务</td>
                    <td colspan="3">'.@$new_data->text11.'</td>
                    <td>职称</td>
                    <td colspan="2">'.@$new_data->text12.'</td>
                </tr>
                <tr>
                    <td>所学专业</td>
                    <td colspan="2">'.@$new_data->text13.'</td>
                    <td>手机号码</td>
                    <td colspan="2">'.@$new_data->text14.'</td>
                    <td>办公电话</td>
                    <td colspan="3">'.@$new_data->text15.'</td>
                    <td>电子邮箱</td>
                    <td colspan="2">'.@$new_data->text16.'</td>
                </tr>
                <tr>
                    <td rowspan="32" class="14">项目组成员（含项目负责人）</td>
                </tr>
                <tr>
                    <td>序号</td>
                    <td>姓名</td>
                    <td>证件类型</td>
                    <td>证件号码</td>
                    <td>年龄</td>
                    <td>性别</td>
                    <td>职务</td>
                    <td>职称</td>
                    <td>学历</td>
                    <td>现从事专业</td>
                    <td>分工</td>
                    <td>所在单位</td>
                    <td>签　名</td>
                </tr>';



                @$i = 1;
                foreach (@$text17 as $v) {
                    $html .='
                                    <tr>
                                        <td>'.@$i.'</td>
                                        <td>'.@$v->text1.'</td>
                                        <td>'.@$v->text2.'</td>
                                        <td>'.@$v->text3.'</td>
                                        <td>'.@$v->text4.'</td>
                                        <td>'.@$v->text5.'</td>
                                        <td>'.@$v->text6.'</td>
                                        <td>'.@$v->text7.'</td>
                                        <td>'.@$v->text8.'</td>
                                        <td>'.@$v->text9.'</td>
                                        <td>'.@$v->text10.'</td>
                                        <td>'.@$v->text11.'</td>
                                        <td>'.@$v->text12.'</td>
                                    </tr>
                                    ';
                    $i++;
                }

                $html .='
                </tbody>
            </table>
        </div>
        ';

            return $html;

    }



}
